import axios from 'axios'

const as = axios.create({
    baseURL:"http://8.136.105.10:8081/",
    // baseURL:"http://localhost:8081/",


    timeout: 5000
})


//请求拦截
as.interceptors.request.use(
    (configr)=>{
        configr.headers.token = localStorage.getItem("token")
        return configr
    },
    (error)=>{console.log(error)}
    )

as.interceptors.response.use(
    (response)=>{return response},
    (error)=>{console.log(error)}
)


export default as